package pe.gob.osinergmin.interfase_siaf.dac.certificacion.dao.impl;

import java.sql.Connection;
import java.sql.Date;
import java.sql.PreparedStatement;
import java.util.List;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Repository;

import pe.gob.osinergmin.interfase_siaf.dac.certificacion.dao.CertificacionDao;
import pe.gob.osinergmin.interfase_siaf.dac.common.dao.impl.Conexion;
import pe.gob.osinergmin.interfase_siaf.dac.domain.interfase.CertCab;
import pe.gob.osinergmin.interfase_siaf.dac.domain.interfase.CertDet;

@Repository("certificacionDao")
public class CertificacionDaoImpl implements CertificacionDao {
	
	 private final Log logger = LogFactory.getLog(getClass());
 	
	
	  @Value("${jdbc.driverClassName}")
	  private String driverClassName;

	  @Value("${jdbc.urlInterfase}")
	  private String url;

	  @Value("${jdbc.username}")
	  private String userName;

	  @Value("${jdbc.password}")
	  private String password;	 
	  
	  @Value("${jdbc.driverClassNameODBC}")
	  private String driverClassNameODBC;
	  
	  @Value("${jdbc.urlInterfaseODBC}")
	  private String urlODBC;
	  

	
	/**DECLARACION DE SQL**/	
		
	/***GRABANDO DATOS PARA LA ETAPA CERTIFICACION****/
	
	private static final String SQL_INSERT_CAB_CERTIFICACION ="INSERT INTO CERT_CAB (SECUENCIAL,ANO_EJE,SEC_EJEC,ES_COMP,"
			+ " TIPO_OPE,COD_DOC,NUM_DOC,FEC_DOC,FTE_FIN,MONEDA,T_CAMBIO,GLOZA,ESTADO,UE_ENVIO,UE_ESTADO,"
			+ " INTF_CER,INTF_SEC,INTF_COR,ESTADO_REG,DATO_ORI,TIPO_FINAN,TIPO_ID,RUC,SIAF_CER,SIAF_SEC,SIAF_COR,"
			+ " MEF_ESTADO,MEF_ERROR,MEF_MENSA) "
			+ " VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
	
	private static final String SQL_INSERT_CAB_COMPROMISO_ANUAL ="INSERT INTO CERT_CAB (SECUENCIAL,ANO_EJE,SEC_EJEC,ES_COMP,"
			+ " TIPO_OPE,COD_DOC,NUM_DOC,FEC_DOC,TIPO_ID,RUC,FTE_FIN,MONEDA,T_CAMBIO,GLOZA,ESTADO,UE_ENVIO,UE_ESTADO,"
			+ " INTF_CER,INTF_SEC,INTF_COR,ESTADO_REG,DATO_ORI,TIPO_FINAN,SIAF_CER,SIAF_SEC,SIAF_COR,"
			+ " MEF_ESTADO,MEF_ERROR,MEF_MENSA) "
			+ " VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
	
	private static final String SQL_INSERT_DET_CERTIFICACION ="INSERT INTO CERT_DET (SECUENCIAL,ID_CLASIFI,CLASIFNIV1,CLASIFNIV2,"
			+ " CLASIFNIV3,CLASIFNIV4,CLASIFNIV5,CLASIFNIV6,SEC_FUNC,MONTO,MONTO_MN) "
			+ " VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
	
	/***Metodo para grabar datos de certificacion***/
	@Override
	public int insertarCertificacion(Map<String, Object> params) throws Exception{
		 Connection cn = null;		
		 PreparedStatement insertCab = null;
		 PreparedStatement insertDet = null;			
		 int valor =0;
		 int valor1=0;	
		 CertCab c = (CertCab) params.get("certCab");   
	     @SuppressWarnings("unchecked")
		 List<CertDet> detLista = (List<CertDet>) params.get("listaDet");	
		 try {
			 
			 /***conexion con la libreria stateles desde el archivo properties*/
		     cn = Conexion.getConexion(driverClassName,url,userName,password);		     
		     cn.setAutoCommit(false);
		    
		     /**INSERTAR EN CAB**/			
		      // create PreparedStatement object for INSERT operation		   
		     insertCab = cn.prepareStatement(SQL_INSERT_CAB_CERTIFICACION);
		     insertDet = cn.prepareStatement(SQL_INSERT_DET_CERTIFICACION);	     
		   
		     insertCab.setString(1, c.getSecuencial());
		     insertCab.setString(2, c.getAnoEje());
		     insertCab.setString(3, c.getSecEjec());
		     insertCab.setString(4, c.getEsComp());
		     insertCab.setString(5, c.getTipoOpe());		
		     insertCab.setString(6, c.getCodDoc());		    
		     insertCab.setString(7, c.getNumDoc());
		     if(c.getFecDoc()!=null){
		    	 insertCab.setDate(8, new Date(c.getFecDoc().getTime())); 
		     }else{
		    	 insertCab.setNull(8, java.sql.Types.DATE);
		     }		    
		     insertCab.setString(9, c.getFteFin());	     
		     insertCab.setString(10, c.getMoneda().toUpperCase());
		     if(c.gettCambio()!=null){
		    	 insertCab.setDouble(11, c.gettCambio()); 
		     }else{
		    	 insertCab.setNull(11, java.sql.Types.DOUBLE);
		     }
		     insertCab.setString(12, c.getGloza());   
		     insertCab.setString(13, c.getEstado());
		     insertCab.setString(14, c.getUeEnvio());     
		     insertCab.setString(15, c.getUeEstado()); 
		     insertCab.setString(16, c.getIntfCer());
		     insertCab.setString(17, c.getIntfSec());
		     insertCab.setString(18, c.getIntfCor());	     
		     insertCab.setString(19, c.getEstadoReg());
		     insertCab.setString(20, c.getDatoOri());	
		     insertCab.setString(21, c.getTipoFinan());
		     insertCab.setString(22, c.getTipoId());
		     insertCab.setString(23, c.getRuc());
		     //datos de solo lectura
		     insertCab.setString(24, "");	     
		     insertCab.setString(25, "");
		     insertCab.setString(26, "");	
		     insertCab.setString(27, "");
		     insertCab.setString(28, "");
		     insertCab.setString(29, "");
		     
		     
		     valor = insertCab.executeUpdate();		     	     
		     logger.info("VALOR DEL GRABADO CAB. CERT:  "+valor);	     
		     
		     /**INSERTAR EN DET09**/ 
		     for(CertDet d:detLista){
		    	 insertDet.setString(1, d.getSecuencial());
			     insertDet.setString(2, d.getIdClasifi());
			     insertDet.setString(3, d.getClasifniv1());
			     insertDet.setString(4, d.getClasifniv2());
			     insertDet.setString(5, d.getClasifniv3());
			     insertDet.setString(6, d.getClasifniv4());
			     insertDet.setString(7, d.getClasifniv5());
			     insertDet.setString(8, d.getClasifniv6());
			     insertDet.setString(9, d.getSecFunc());			   
			     if(d.getMonto()!=null){
			    	 insertDet.setDouble(10, d.getMonto()); 
			     }else{
			    	 insertDet.setNull(10, java.sql.Types.DOUBLE);  
			     }	
			     if(d.getMontoMn()!=null){
			    	  insertDet.setDouble(11, d.getMontoMn());
			     }else{
			    	 insertDet.setNull(11, java.sql.Types.DOUBLE);  
			     }			  		    
			     valor1 = insertDet.executeUpdate();			   	     
			     logger.info("VALOR DEL GRABADO DET. CET:  "+valor1); 
		       }		   
		    /****Comiteaando**/		    
		    cn.rollback();	 
		   return 1;
		} catch (Exception e) {
			e.printStackTrace();
			  logger.info("Error al grabar datos certificacion rollbac" +e); 			
			if (cn != null) {
	            try { 
	            	logger.info("NO HIZO COMMIT");
	                logger.info("Error al grabar certificacion  rollbac1"); 
	                cn.rollback();	             
	                cn.close();	              
	            } catch(Exception excep) {
	            	  logger.info("Error al grabar datos certificacion rollbac" +e); 
	            }
	        }			
			return 0;
		}finally{			
			logger.info("Cerrando el preparedstamenrt del finally"); 
			 if (insertCab != null) {
				 insertCab.close();
			 }
			 if (insertDet != null) {
				 insertDet.close();
			 }			 
	         cn.setAutoCommit(true);
			 cn.close();
			 insertarCertificacion_1(c,detLista);		
		}
		
	}
	
	private void insertarCertificacion_1(CertCab c,List<CertDet> lista) throws Exception{
		 Connection cn = null;		
		 PreparedStatement insertCab = null;
		 PreparedStatement insertDet = null;		
		 int valor =0;
		 int valor1=0;		
		 try {		     
		     /***conexion con odbc  desde el archivo properties*/
			 cn = Conexion.getConexionODBC(driverClassNameODBC,urlODBC,userName,password);	
		     
		     cn.setAutoCommit(false);
		    
		     /**INSERTAR EN CAB**/			
		      // create PreparedStatement object for INSERT operation		   
		     insertCab = cn.prepareStatement(SQL_INSERT_CAB_CERTIFICACION);
		     insertDet = cn.prepareStatement(SQL_INSERT_DET_CERTIFICACION);	 	   
		     
		     insertCab.setString(1, c.getSecuencial());
		     insertCab.setString(2, c.getAnoEje());
		     insertCab.setString(3, c.getSecEjec());
		     insertCab.setString(4, c.getEsComp());
		     insertCab.setString(5, c.getTipoOpe());		
		     insertCab.setString(6, c.getCodDoc());		    
		     insertCab.setString(7, c.getNumDoc());
		     if(c.getFecDoc()!=null){
		    	 insertCab.setDate(8, new Date(c.getFecDoc().getTime())); 
		     }else{
		    	 insertCab.setNull(8, java.sql.Types.DATE);
		     }		    
		     insertCab.setString(9, c.getFteFin());	     
		     insertCab.setString(10, c.getMoneda().toUpperCase());
		     if(c.gettCambio()!=null){
		    	 insertCab.setDouble(11, c.gettCambio()); 
		     }else{
		    	 insertCab.setNull(11, java.sql.Types.DOUBLE);
		     }
		     insertCab.setString(12, c.getGloza());   
		     insertCab.setString(13, c.getEstado());
		     insertCab.setString(14, c.getUeEnvio());     
		     insertCab.setString(15, c.getUeEstado()); 
		     insertCab.setString(16, c.getIntfCer());
		     insertCab.setString(17, c.getIntfSec());
		     insertCab.setString(18, c.getIntfCor());	     
		     insertCab.setString(19, c.getEstadoReg());
		     insertCab.setString(20, c.getDatoOri());	
		     insertCab.setString(21, c.getTipoFinan());	
		     insertCab.setString(22, c.getTipoId());
		     insertCab.setString(23, c.getRuc());
		   //datos de solo lectura
		     insertCab.setString(24, "");	     
		     insertCab.setString(25, "");
		     insertCab.setString(26, "");	
		     insertCab.setString(27, "");
		     insertCab.setString(28, "");
		     insertCab.setString(29, "");
		     valor = insertCab.executeUpdate();		     	     
		     logger.info("VALOR DEL GRABADO CAB. CERT:  "+valor);	     
		     
		     /**INSERTAR EN DET09**/ 
		     for(CertDet d:lista){
		    	 insertDet.setString(1, d.getSecuencial());
			     insertDet.setString(2, d.getIdClasifi());
			     insertDet.setString(3, d.getClasifniv1());
			     insertDet.setString(4, d.getClasifniv2());
			     insertDet.setString(5, d.getClasifniv3());
			     insertDet.setString(6, d.getClasifniv4());
			     insertDet.setString(7, d.getClasifniv5());
			     insertDet.setString(8, d.getClasifniv6());
			     insertDet.setString(9, d.getSecFunc());			   
			     if(d.getMonto()!=null){
			    	 insertDet.setDouble(10, d.getMonto()); 
			     }else{
			    	 insertDet.setNull(10, java.sql.Types.DOUBLE);  
			     }	
			     if(d.getMontoMn()!=null){
			    	  insertDet.setDouble(11, d.getMontoMn());
			     }else{
			    	 insertDet.setNull(11, java.sql.Types.DOUBLE);  
			     }			  		    
			     valor1 = insertDet.executeUpdate();			   	     
			     logger.info("VALOR DEL GRABADO DET. CET:  "+valor1); 
		       }		   
		    /****todo esta ok commit**/			   
		    cn.commit();		   
		} catch (Exception e) {		
			  logger.info("Error al grabar datos certificacion rollbac" +e); 			
			if (cn != null) {
	            try { 
	            	logger.info("NO HIZO COMMIT");
	                logger.info("Error al grabar datos certificacion rollbac1"); 
	                cn.rollback();	              
	                cn.close();	             
	            } catch(Exception excep) {
	            	  logger.info("Error al grabar datos certificacion rollbac" +e); 
	            }
	        }			
		}finally{			
			logger.info("Cerrando el preparedstamenrt del finally"); 
			 if (insertCab != null) {
				 insertCab.close();
			 }
			 if (insertDet != null) {
				 insertDet.close();
			 }			
	         cn.setAutoCommit(true);
			 cn.close();
	    }		
	}
	
	
	/***Metodo para grabar datos de Compromiso anual***/
	@Override
	public int insertarCompromisoAnual(Map<String, Object> params) throws Exception{
		 Connection cn = null;		
		 PreparedStatement insertCab = null;
		 PreparedStatement insertDet = null;			
		 int valor =0;
		 int valor1=0;	
		 CertCab c = (CertCab) params.get("certCab");   
	     @SuppressWarnings("unchecked")
		 List<CertDet> detLista = (List<CertDet>) params.get("listaDet");	
		 try {
			 
			 /***conexion con la libreria stateles desde el archivo properties*/
		     cn = Conexion.getConexion(driverClassName,url,userName,password);		     
		     cn.setAutoCommit(false);
		    
		     /**INSERTAR EN CAB**/			
		      // create PreparedStatement object for INSERT operation		   
		     insertCab = cn.prepareStatement(SQL_INSERT_CAB_COMPROMISO_ANUAL);
		     insertDet = cn.prepareStatement(SQL_INSERT_DET_CERTIFICACION);	     
		   
		     insertCab.setString(1, c.getSecuencial());
		     insertCab.setString(2, c.getAnoEje());
		     insertCab.setString(3, c.getSecEjec());
		     insertCab.setString(4, c.getEsComp());
		     insertCab.setString(5, c.getTipoOpe());		
		     insertCab.setString(6, c.getCodDoc());		    
		     insertCab.setString(7, c.getNumDoc());
		     if(c.getFecDoc()!=null){
		    	 insertCab.setDate(8, new Date(c.getFecDoc().getTime())); 
		     }else{
		    	 insertCab.setNull(8, java.sql.Types.DATE);
		     }
		     insertCab.setString(9, c.getTipoId());
		     insertCab.setString(10, c.getRuc());
		     insertCab.setString(11, c.getFteFin());	     
		     insertCab.setString(12, c.getMoneda().toUpperCase());
		     if(c.gettCambio()!=null){
		    	 insertCab.setDouble(13, c.gettCambio()); 
		     }else{
		    	 insertCab.setNull(13, java.sql.Types.DOUBLE);
		     }
		     insertCab.setString(14, c.getGloza());   
		     insertCab.setString(15, c.getEstado());
		     insertCab.setString(16, c.getUeEnvio());     
		     insertCab.setString(17, c.getUeEstado()); 
		     insertCab.setString(18, c.getIntfCer());
		     insertCab.setString(19, c.getIntfSec());
		     insertCab.setString(20, c.getIntfCor());	     
		     insertCab.setString(21, c.getEstadoReg());
		     insertCab.setString(22, c.getDatoOri());	
		     insertCab.setString(23, c.getTipoFinan());	
		   //datos de solo lectura
		     insertCab.setString(24, "");	     
		     insertCab.setString(25, "");
		     insertCab.setString(26, "");	
		     insertCab.setString(27, "");
		     insertCab.setString(28, "");
		     insertCab.setString(29, "");
		     
		     valor = insertCab.executeUpdate();		     	     
		     logger.info("VALOR DEL GRABADO CAB. COMPROMISO ANUAL:  "+valor);	     
		     
		     /**INSERTAR EN DET09**/ 
		     for(CertDet d:detLista){
		    	 insertDet.setString(1, d.getSecuencial());
			     insertDet.setString(2, d.getIdClasifi());
			     insertDet.setString(3, d.getClasifniv1());
			     insertDet.setString(4, d.getClasifniv2());
			     insertDet.setString(5, d.getClasifniv3());
			     insertDet.setString(6, d.getClasifniv4());
			     insertDet.setString(7, d.getClasifniv5());
			     insertDet.setString(8, d.getClasifniv6());
			     insertDet.setString(9, d.getSecFunc());			   
			     if(d.getMonto()!=null){
			    	 insertDet.setDouble(10, d.getMonto()); 
			     }else{
			    	 insertDet.setNull(10, java.sql.Types.DOUBLE);  
			     }	
			     if(d.getMontoMn()!=null){
			    	  insertDet.setDouble(11, d.getMontoMn());
			     }else{
			    	 insertDet.setNull(11, java.sql.Types.DOUBLE);  
			     }			  		    
			     valor1 = insertDet.executeUpdate();			   	     
			     logger.info("VALOR DEL GRABADO DET. COMPROMISO ANUAL:  "+valor1); 
		       }		   
		    /****Comiteaando**/		    
		    cn.rollback();	 
		   return 1;
		} catch (Exception e) {			
			  logger.info("Error al grabar datos compromiso anual rollbac" +e); 			
			if (cn != null) {
	            try { 
	            	logger.info("NO HIZO COMMIT");
	                logger.info("Error al grabar compromiso anual rollbac 1"); 
	                cn.rollback();	             
	                cn.close();	              
	            } catch(Exception excep) {
	            	  logger.info("Error al grabar datos compromiso anual rollbac" +e); 
	            }
	        }			
			return 0;
		}finally{			
			logger.info("Cerrando el preparedstamenrt del finally"); 
			 if (insertCab != null) {
				 insertCab.close();
			 }
			 if (insertDet != null) {
				 insertDet.close();
			 }			 
	         cn.setAutoCommit(true);
			 cn.close();
			 insertarCompromisoAnual_1(c,detLista);		
		}
		
	}
	
	private void insertarCompromisoAnual_1(CertCab c,List<CertDet> lista) throws Exception{
		 Connection cn = null;		
		 PreparedStatement insertCab = null;
		 PreparedStatement insertDet = null;		
		 int valor =0;
		 int valor1=0;		
		 try {		     
		     /***conexion con odbc  desde el archivo properties*/
			 cn = Conexion.getConexionODBC(driverClassNameODBC,urlODBC,userName,password);	
		     
		     cn.setAutoCommit(false);
		    
		     /**INSERTAR EN CAB**/			
		      // create PreparedStatement object for INSERT operation		   
		     insertCab = cn.prepareStatement(SQL_INSERT_CAB_COMPROMISO_ANUAL);
		     insertDet = cn.prepareStatement(SQL_INSERT_DET_CERTIFICACION);	 	   
		     
		     insertCab.setString(1, c.getSecuencial());
		     insertCab.setString(2, c.getAnoEje());
		     insertCab.setString(3, c.getSecEjec());
		     insertCab.setString(4, c.getEsComp());
		     insertCab.setString(5, c.getTipoOpe());		
		     insertCab.setString(6, c.getCodDoc());		    
		     insertCab.setString(7, c.getNumDoc());
		     if(c.getFecDoc()!=null){
		    	 insertCab.setDate(8, new Date(c.getFecDoc().getTime())); 
		     }else{
		    	 insertCab.setNull(8, java.sql.Types.DATE);
		     }
		     insertCab.setString(9, c.getTipoId());
		     insertCab.setString(10, c.getRuc());
		     insertCab.setString(11, c.getFteFin());	     
		     insertCab.setString(12, c.getMoneda().toUpperCase());
		     if(c.gettCambio()!=null){
		    	 insertCab.setDouble(13, c.gettCambio()); 
		     }else{
		    	 insertCab.setNull(13, java.sql.Types.DOUBLE);
		     }
		     insertCab.setString(14, c.getGloza());   
		     insertCab.setString(15, c.getEstado());
		     insertCab.setString(16, c.getUeEnvio());     
		     insertCab.setString(17, c.getUeEstado()); 
		     insertCab.setString(18, c.getIntfCer());
		     insertCab.setString(19, c.getIntfSec());
		     insertCab.setString(20, c.getIntfCor());	     
		     insertCab.setString(21, c.getEstadoReg());
		     insertCab.setString(22, c.getDatoOri());	
		     insertCab.setString(23, c.getTipoFinan());
		   //datos de solo lectura
		     insertCab.setString(24, "");	     
		     insertCab.setString(25, "");
		     insertCab.setString(26, "");	
		     insertCab.setString(27, "");
		     insertCab.setString(28, "");
		     insertCab.setString(29, "");
		     
		     valor = insertCab.executeUpdate();		     	     
		     logger.info("VALOR DEL GRABADO CAB. COMPROMISO ANUAL:  "+valor);	     
		     
		     /**INSERTAR EN DET09**/ 
		     for(CertDet d:lista){
		    	 insertDet.setString(1, d.getSecuencial());
			     insertDet.setString(2, d.getIdClasifi());
			     insertDet.setString(3, d.getClasifniv1());
			     insertDet.setString(4, d.getClasifniv2());
			     insertDet.setString(5, d.getClasifniv3());
			     insertDet.setString(6, d.getClasifniv4());
			     insertDet.setString(7, d.getClasifniv5());
			     insertDet.setString(8, d.getClasifniv6());
			     insertDet.setString(9, d.getSecFunc());			   
			     if(d.getMonto()!=null){
			    	 insertDet.setDouble(10, d.getMonto()); 
			     }else{
			    	 insertDet.setNull(10, java.sql.Types.DOUBLE);  
			     }	
			     if(d.getMontoMn()!=null){
			    	  insertDet.setDouble(11, d.getMontoMn());
			     }else{
			    	 insertDet.setNull(11, java.sql.Types.DOUBLE);  
			     }			  		    
			     valor1 = insertDet.executeUpdate();			   	     
			     logger.info("VALOR DEL GRABADO DET. COMPROMISO ANUAL:  "+valor1); 
		       }		   
		    /****todo esta ok commit**/			   
		    cn.commit();		   
		} catch (Exception e) {		
			  logger.info("Error al grabar datos compromiso anual rollbac" +e); 			
			if (cn != null) {
	            try { 
	            	logger.info("NO HIZO COMMIT");
	                logger.info("Error al grabar datos compromiso anual rollbac1"); 
	                cn.rollback();	              
	                cn.close();	             
	            } catch(Exception excep) {
	            	  logger.info("Error al grabar datos compromiso anual rollbac" +e); 
	            }
	        }			
		}finally{			
			logger.info("Cerrando el preparedstamenrt del finally"); 
			 if (insertCab != null) {
				 insertCab.close();
			 }
			 if (insertDet != null) {
				 insertDet.close();
			 }			
	         cn.setAutoCommit(true);
			 cn.close();
	    }		
	}
	

	/**
	 * @return the driverClassName
	 */
	public String getDriverClassName() {
		return driverClassName;
	}

	/**
	 * @param driverClassName the driverClassName to set
	 */
	public void setDriverClassName(String driverClassName) {
		this.driverClassName = driverClassName;
	}

	/**
	 * @return the url
	 */
	public String getUrl() {
		return url;
	}

	/**
	 * @param url the url to set
	 */
	public void setUrl(String url) {
		this.url = url;
	}

	/**
	 * @return the userName
	 */
	public String getUserName() {
		return userName;
	}

	/**
	 * @param userName the userName to set
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}

	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * @return the driverClassNameODBC
	 */
	public String getDriverClassNameODBC() {
		return driverClassNameODBC;
	}

	/**
	 * @param driverClassNameODBC the driverClassNameODBC to set
	 */
	public void setDriverClassNameODBC(String driverClassNameODBC) {
		this.driverClassNameODBC = driverClassNameODBC;
	}

	/**
	 * @return the urlODBC
	 */
	public String getUrlODBC() {
		return urlODBC;
	}

	/**
	 * @param urlODBC the urlODBC to set
	 */
	public void setUrlODBC(String urlODBC) {
		this.urlODBC = urlODBC;
	}	
	
	
	
	

}
